# ommbot/myimport.py
#
#

""" provide own import function for absolute imports """

__copyright__ = 'this file is in the public domain'

def my_import(name):
    """ absolute import """
    result = __import__(name)
    mods = name.split('.')
    if len(mods) == 1:
        pass
    else:
        # expand module name
        for mod in mods[1:]:
            result = getattr(result, mod)
    return result
